package com.akrc.blog.mapper;

import com.akrc.blog.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
	@Select("SELECT name,id,nick_name,mail,avatar FROM user WHERE id = ${id}")
	@Results({
			@Result(property = "name", column = "name"),
			@Result(property = "id", column = "id"),
			@Result(property = "nick_name", column = "nick_name"),
			@Result(property = "mail", column = "mail"),
			@Result(property = "avatar", column = "avatar")
	})
	User getByID(Integer id);
}
